home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3dm / audiofile / afInitPCMMapping.z / afInitPCMMapping
Encoding:
Text File  |  1998-10-20  |  6.9 KB  |  133 lines

  1.  
  2.  
  3.  
  4. aaaaffffIIIInnnniiiittttPPPPCCCCMMMMMMMMaaaappppppppiiiinnnngggg((((3333ddddmmmm))))                                    aaaaffffIIIInnnniiiittttPPPPCCCCMMMMMMMMaaaappppppppiiiinnnngggg((((3333ddddmmmm))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      afInitPCMMapping - configure the PCM mapping for an audio track in an
  10.      AAAAFFFFffffiiiilllleeeesssseeeettttuuuupppp structure
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////aaaauuuuddddiiiiooooffffiiiilllleeee....hhhh>>>>
  14.  
  15.      vvvvooooiiiidddd aaaaffffIIIInnnniiiittttPPPPCCCCMMMMMMMMaaaappppppppiiiinnnngggg((((AAAAFFFFffffiiiilllleeeesssseeeettttuuuupppp sssseeeettttuuuupppp,,,, iiiinnnntttt ttttrrrraaaacccckkkk,,,,
  16.                            ddddoooouuuubbbblllleeee ssssllllooooppppeeee,,,, ddddoooouuuubbbblllleeee iiiinnnntttteeeerrrrcccceeeepppptttt,,,,
  17.                            ddddoooouuuubbbblllleeee mmmmiiiinnnncccclllliiiipppp,,,, ddddoooouuuubbbblllleeee mmmmaaaaxxxxcccclllliiiipppp))))
  18.  
  19. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRR
  20.      _s_e_t_u_p   expects an AAAAFFFFffffiiiilllleeeesssseeeettttuuuupppp structure, previously created by a call to
  21.              aaaaffffNNNNeeeewwwwFFFFiiiilllleeeeSSSSeeeettttuuuupppp(3dm).
  22.  
  23.      _t_r_a_c_k   is an integer which identifies an audio track in _s_e_t_u_p.
  24.  
  25.              Since all currently supported file formats contain one audio
  26.              track, the value AAAAFFFF____DDDDEEEEFFFFAAAAUUUULLLLTTTT____TTTTRRRRAAAACCCCKKKK should always be used here.
  27.  
  28.      _s_l_o_p_e   is a positive double-precision floating point value which
  29.              specifies an amplitude scaling factor for the waveform to be
  30.              associated with _t_r_a_c_k.
  31.  
  32.      _i_n_t_e_r_c_e_p_t
  33.              is a positive, negative, or zero double-precision floating point
  34.              value which specifies the sample value which represents the
  35.              vertical midpoint ("zero crossing") of the waveform to be
  36.              associated with _t_r_a_c_k.
  37.  
  38.      _m_i_n_c_l_i_p and _m_a_x_c_l_i_p
  39.              are double-precision floating point values which specify the
  40.              maximum desired negative and positive amplitudes for the waveform
  41.              associated with _t_r_a_c_k.  Any values encountered outside the range
  42.              [_m_i_n_c_l_i_p, _m_a_x_c_l_i_p] will be clipped, i.e., set to these values.
  43.  
  44. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  45.      aaaaffffIIIInnnniiiittttPPPPCCCCMMMMMMMMaaaappppppppiiiinnnngggg(((()))) configures the PCM mapping for the specified audio
  46.      track in an AAAAFFFFffffiiiilllleeeesssseeeettttuuuupppp structure.  _s_e_t_u_p is passed to aaaaffffOOOOppppeeeennnnFFFFiiiilllleeee(3dm)
  47.      when a new audio file is created.  See _a_f_I_n_t_r_o(3dm) for a detailed
  48.      description of the PCM mapping technique.
  49.  
  50. EEEEXXXXAAAAMMMMPPPPLLLLEEEE
  51.      To configure _s_e_t_u_p for a floating point waveform with a total expected
  52.      amplitude of 100.0 (i.e., values between -100.0 and 100.0) and a
  53.      symmetrical clipping to match, and a 0.0 zero crossing value, the track
  54.      would be initialized with the following:
  55.  
  56.      afInitPCMMapping(setup, AAAAFFFF____DDDDEEEEFFFFAAAAUUUULLLLTTTT____TTTTRRRRAAAACCCCKKKK, 100.0, 0.0, -100.0, 100.0);
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. aaaaffffIIIInnnniiiittttPPPPCCCCMMMMMMMMaaaappppppppiiiinnnngggg((((3333ddddmmmm))))                                    aaaaffffIIIInnnniiiittttPPPPCCCCMMMMMMMMaaaappppppppiiiinnnngggg((((3333ddddmmmm))))
  71.  
  72.  
  73.  
  74. CCCCAAAAVVVVEEEEAAAATTTTSSSS
  75.      If this routine is used, it must be called _a_f_t_e_r any calls to
  76.      aaaaffffIIIInnnniiiittttSSSSaaaammmmpppplllleeeeFFFFoooorrrrmmmmaaaatttt(((()))).  Setting the sample format automatically resets the
  77.      PCM mapping to the default values for the requested format.  PCM mapping
  78.      is useful for modifying the values of frames as they are read into or
  79.      written out from a buffer via aaaaffffRRRReeeeaaaaddddFFFFrrrraaaammmmeeeessss(3dm) or aaaaffffWWWWrrrriiiitttteeeeFFFFrrrraaaammmmeeeessss(3dm).
  80.      None of the currently supported file formats have the capability to store
  81.      mapping information, even though the actual mapping can and will be
  82.      applied to the frames stored in those files.  Therefor, it is important
  83.      to be careful what values you specify.  In general, all two's complement
  84.      and floating point sample formats are expected to be symmetrical about
  85.      zero, i.e., the iiiinnnntttteeeerrrrcccceeeepppptttt will be 0.0 and _m_i_n_c_l_i_p and _m_a_x_c_l_i_p will be
  86.      negative and positive N, where N is some non-zero positive value.
  87.  
  88. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  89.      aaaaffffOOOOppppeeeennnnFFFFiiiilllleeee(3dm), aaaaffffNNNNeeeewwwwFFFFiiiilllleeeeSSSSeeeettttuuuupppp(3dm), aaaaffffRRRReeeeaaaaddddFFFFrrrraaaammmmeeeessss(3dm),
  90.      aaaaffffWWWWrrrriiiitttteeeeFFFFrrrraaaammmmeeeessss(3dm), aaaaffffSSSSeeeettttTTTTrrrraaaacccckkkkPPPPCCCCMMMMMMMMaaaappppppppiiiinnnngggg(3dm),
  91.      aaaaffffSSSSeeeettttVVVViiiirrrrttttuuuuaaaallllPPPPCCCCMMMMMMMMaaaappppppppiiiinnnngggg(3dm), aaaaffffGGGGeeeettttVVVViiiirrrrttttuuuuaaaallllPPPPCCCCMMMMMMMMaaaappppppppiiiinnnngggg(3dm)
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.